$(function(){


    var endPointOptions = {
        url : "http://localhost:9300/GetEmployees",
        type: "GET",
        dataType: "json",
        success: function(data,status,requestObj){

//            <tr><td>1</td><td>John</td><td>Developer</td>
//                <td>NewYork</td>
//
//            </tr>
            var employeeList = data.empData.EmployeeList;
            var empTableDataString = '';
            for(var i = 0; i < employeeList.length; i++){
                empTableDataString += '<tr class="success"><td>' + (i + 1)
                    + '</td><td class="danger">' + employeeList[i].name
                    + '</td><td class="warning">' + employeeList[i].title
                    + '</td><td class="primary">' + employeeList[i].city
                     + '</tr>';


              }

            $('#employeeDetails tbody').append(empTableDataString);

        },
        error : function(error){

            alert('error occurred');
        },
        complete: function(){

        }
    };


    $.ajax(endPointOptions);


});